1. Field of the Invention
The present invention relates generally to a method for managing states in a wireless network, and in particular, to a method for software-processing a state management function (also known as a “state machine”) for implementing a wireless Media Access Control protocol.
2. Description of the Related Art
Generally, in wireless networks, state management is achieved by a Media Access Control (MAC) layer. In design of Software Defined MAC (SDM) based on a state machine, substantial events include various types of events in which interrupts are not taken into consideration. Such events cause an increase in complexity of an event routine, i.e. Interrupt Service Routine (ISR), thus considerably affecting performance of the MAC layer.
Generally, in a MAC protocol, a state machine is expressed as Finite State Machine (FSM). In the state machine, an event participating in state transition is an interrupt. An interrupt associated with the MAC protocol occurs in a physical layer and a timer.
FIG. 1 illustrates state transition achieved by a MAC layer in the conventional wireless network.
As can be understood from FIG. 1, there are various states which are managed by a state machine performed by the MAC layer. The states managed by the state machine can be listed as shown in Table 1.
TABLE 1ConditionDescriptionPHY IntrTimer IntrC_1New frame ready to sendInternal Event 1C_2Backoff needed for CollisionInternal Event 2AvoidanceC_3DIFS Defer ends and transmitDIFS Time outreadyC_4Backoff period endsBackoff TimeoutC_5RTS sentFrm Tx EndC_6CTS receivedFrm Rx EndC_7Frame ready to transmitInternal Event 3C_8SIFS Defer endsSIFS Time outC_9Frame sent to physical layerFrm Tx EndC_10ACK message receivedFrm Rx EndC_11Frame sent to physical layerFrm Tx EndC_12CTS not received and retrySIFS Time outlimit reachedC_13External events happening,new packet arrives from upperlayer or physical layer
Referring to Table 1, state management is achieved in a MAC layer, but an interrupt corresponding to an event is achieved by an operation of a physical layer and a timer. That is, conventionally, the relationship between a state machine achieved in the MAC layer and an interrupt achieved by the physical layer and the timer is not taken into consideration.
FIG. 2 illustrates operation state transition based on an event occurring in the conventional wireless network.
Referring to FIG. 2, it can be apparently noted that transition of an operation state by a state machine in a MAC layer and occurrence of an interrupt corresponding to each event are separated from each other.
As described above, in the state machine achieved in the existing wireless network, as an event manager gathers interrupts and internal events before sending, the event routine is high in its complexity. In addition, as the event manager gathers interrupts and internal events before sending, the state machine is dependent on the system timer and participates in state transition in response not only to the interrupts but also to the internal events, causing an inevitable increase in the complexity. Further, when the state machine is managed in the ISR, there are multiple comparison branch statements during processing in FSM Instance, causing management difficulty.